home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / ObjectTcl-1.1 / examples / Simple / B.tcl < prev    next >
Encoding:
Text File  |  1995-06-30  |  383 b   |  22 lines

  1. # File B.otcl
  2.  
  3. otclInterface B -isA A {
  4.    constructor {next value}
  5.    method doIt {}
  6. }
  7.  
  8. otclImplementation B {
  9.    constructor {n v} {{A $n}} {
  10.       set value $v
  11.       puts "B::constructed with value $value"
  12.    }
  13.    destructor {
  14.       puts "B::destructed"
  15.    }
  16.    method doIt {} {
  17.       puts "B::doIt, value is $value, calling A::doIt"
  18.       $this -A doIt
  19.    }
  20.    attribute value
  21. }
  22.